package com.yanqu.road.server.cmd.activity.musicroomrank;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.MusicRoomRankProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.musicroomrank.CrossMusicRoomRankActivityMgr;
import com.yanqu.road.server.manager.activity.musicroomrank.MusicRoomRankActivity;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_MUSIC_ROOM_RANK_SHOW_RESULT_CONFIRM_BACK, desc = "妙音坊冲榜 游戏服处理结算返回")
public class CrossMusicRoomRankShowResultConfirmCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        MusicRoomRankProto.CrossMusicRoomRankHistoryShowDetailReqMsg reqMsg = MusicRoomRankProto.CrossMusicRoomRankHistoryShowDetailReqMsg.parseFrom(packet.getBytes());
        MusicRoomRankActivity activity = CrossMusicRoomRankActivityMgr.getActivity(reqMsg.getActivityId());
        if (activity != null) {
            activity.syncRoomSettleConfirmBack(serverId, reqMsg.getRound());
        }
    }

    @Override
    public void sendData() {

    }
}
